<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@page isELIgnored="false" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <base href="<%=basePath%>">
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <title>MyShop-首页</title>

    <link rel="stylesheet" href="render/css/frontend/common/base.css" type="text/css"/>
    <link rel="stylesheet" href="render/css/frontend/common/shop_common.css" type="text/css"/>
    <link rel="stylesheet" href="render/css/frontend/shop_header.css" type="text/css"/>
    <link rel="stylesheet" href="render/css/frontend/shop_home.css" type="text/css"/>
    <link rel="stylesheet" href="render/css/frontend/shop_list.css" type="text/css"/>
    <link rel="stylesheet" href="render/css/frontend/shop_goods.css" type="text/css"/>
<%--    <link rel="stylesheet" href="/render/css/frontend/common/global.css" rel="stylesheet">--%>
<%--    <link rel="stylesheet" href="render/css/frontend/shop_goodPic.css" type="text/css"/>--%>

    <style type="text/css">
        .goods-descript {
            float: left;
            font-size: 13px;
            padding-left: 8px;
            line-height: 22px;
            /* background: url(../images/rmb.gif) no-repeat 8px 6px; */
            color: #9c978f;
            font-weight: bolder;
        }

        .tuijian_shangpin_img {
            width: 160px;
            height: 160px;
        }

        .myshop_bd_top_left ol.saletop-list li.top dl dt.goods-name {
            float: right;
            width: 160px;
            line-height: 30px !important;
        }

        .myshop_bd_top_left {
            width: 208px !important;
            height: 347px !important;
        }

        .myshop_bd_top_left div.title {
            width: 198px !important;
        }

        .myshop_bd_top_left ol.saletop-list {
            width: 188px !important;
        }

        .myshop_bd_top_left ol.saletop-list li.normal {
            width: 198px !important;
            height: 32px;
        }

        /*---------------*/

        .myshop_bd_top_left {
            width: 238px;
            height: 522px;
            float: left;
            border: 1px solid #D8D8D8;
        }

        .myshop_bd_top_left div.title {
            width: 228px;
            height: 33px;
            border-bottom: 1px solid #D8D8D8;
            background-color: #F7F7F7;
            line-height: 33px;
            font-size: 14px;
            padding-left: 10px;
        }

        .myshop_bd_top_left ol.saletop-list {
            width: 218px;
            padding: 10px;
        }

        .myshop_bd_top_left ol.saletop-list li {
            clear: both;
            border-bottom: 1px dotted #E7E7E7;
            padding: 8px 0;
        }

        .myshop_bd_top_left ol.saletop-list li.normal {
            width: 220px;
            height: 32px;
            line-height: 32px;
            padding: 0;
            overflow: hidden;
        }

        .myshop_bd_top_left ol.saletop-list li.normal i {
            width: 12px;
            padding-right: 3px;
            color: #FFF;
            height: 32px;
            background: url('render/images/nc_home_index.gif') no-repeat -330px 5px;
            text-align: center;
            display: inline-block;
        }

        .myshop_bd_top_left ol.saletop-list li a {
            color: #555555;
        }

        .myshop_bd_top_left ol.saletop-list li.top dl {
            width: 228px;
            position: relative;
        }

        .myshop_bd_top_left ol.saletop-list li.top dl dd.goods-pic {
            float: left;
            width: 60px;
        }

        .myshop_bd_top_left ol.saletop-list li.top dl dd.goods-pic img {
            width: 60px;
            height: 60px;
            display: block;
            border: 1px solid #F7F7F7;
        }

        .myshop_bd_top_left ol.saletop-list li.top dl dd.nokey {
            width: 16px;
            height: 22px;
            position: absolute;
            left: 0px;
            top: 0px;
            background: url('render/images/nc_home_index.gif') -309px top;
            color: #FFF;
            text-align: center;
            line-height: 17px;
        }

        .nokey{
            z-index: 1;
        }

        .myshop_bd_top_left ol.saletop-list li.top dl dt.goods-name {
            float: right;
            width: 160px;
            line-height: 18px;
        }

        .myshop_bd_top_left ol.saletop-list li.top dl dd.goods-price {
            float: left;
            font-size: 13px;
            padding-left: 20px;
            line-height: 22px;
            background: url('../images/rmb.gif') no-repeat 8px 6px;
            color: #D40000;
            font-weight: bolder;
        }

        .myshop_bd_top_left .saletop-list_adv_pic {
            width: 238px;
            text-align: center;
        }

        li.more_product {
            font-size: 23px;
            text-align: center;
            line-height: 200px;
            cursor: pointer;
        }

        #tuijian_content_1_empty {
            /* margin: 80px 0; */
            margin: 72px 0px 0px 0px !important;
            text-align: center;
            font-size: 33px;
            width: 100% !important;
            color: red;
        }

        #tuijian_content_2_empty {
            /* margin: 80px 0; */
            margin: 146px 0px 0px 0px !important;
            text-align: center;
            font-size: 33px;
            width: 100% !important;
            color: red;
        }

        .shop_bd_home_block_left_pic {
            overflow: hidden;
        }
    </style>

    <LINK rel=stylesheet type=text/css href="render/css/frontend/lrtk.css">

    <script type="text/javascript" src="render/js/jquery.min.js"></script>
    <script type="text/javascript" src="render/js/frontend/lrscroll.js"></script>
</head>
<body>
<!-- Header Start -->
<jsp:include page="common/head.jsp"></jsp:include>

<!-- TopHeader Center -->
<jsp:include page="common/topheader_center.jsp"></jsp:include>
<!-- TopHeader Center End -->

<!-- Header Menu -->
<jsp:include page="common/header_menu.jsp"></jsp:include>
<!-- Header Menu End -->

<!-- Body -wll -->
<div class="my_body">
    <div class="shop_bd clearfix">
        <!-- 第一块区域  -->
        <div class="shop_bd_top clearfix">
            <div class="shop_bd_top_left">
                <div class="myshop_bd_top_left">
                    <div class="title">
                        <h3>最新店铺排行</h3>
                    </div>
                    <ol class="saletop-list">
                        <%--查询该分类里商品的热门前0~2--%>
                        <c:if test="${!empty shopNewTime}">
                            <c:forEach items="${shopNewTime}" var="shop" varStatus="status" begin="0" end="2">
                                <%--第几次循环==第几个products--%>
                                <c:if test="${!empty shop}">
                                    <li class="top clearfix">
                                        <dl>
                                            <dt class="goods-name">
                                                <a href="/render/shop/queryShopByShopId?shop_id=${shop.id}">
                                                    ${shop.shop_name}
                                                </a>
                                            </dt>
                                            <dd class="nokey">${status.count}</dd>
                                            <dd class="goods-pic">
                                                <a href="/render/shop/queryShopByShopId?shop_id=${shop.id}">
                                                    <span class="thumb size60">
                                                        <c:if test="${!empty shop.user_image}">
                                                            <img src="${shop.user_image}" alt=""/>
                                                        </c:if>
                                                        <c:if test="${empty shop.user_image}">
                                                            <img src="" border="0">
                                                        </c:if>
                                                    </span>
                                                </a>
                                            </dd>
                                            <dd class="goods-descript">
                                                <em>销量：${shop.sale_count}&nbsp;&nbsp;&nbsp;
                                                浏览量：${shop.popularity}</em>
                                            </dd>
                                        </dl>
                                    </li>
                                </c:if>
                            </c:forEach>
                        </c:if>

                        <c:if test="${!empty shopNewTime}">
                            <c:forEach items="${shopNewTime}" var="shop" begin="0" end="4" varStatus="status">
                                <c:if test="${status.count>3}">
                                    <li class="normal">
                                        <i>${status.count}</i>
                                        <a href="/render/shop/queryShopByShopId?shop_id=${shop.id}">${shop.shop_name}</a>
                                    </li>
                                </c:if>
                            </c:forEach>
                        </c:if>
                    </ol>
                </div>
            </div>
            <div class="shop_bd_top_center">
                <!-- 图片切换  begin  -->
                <div class="xifan_sub_box">
                    <div id="p-select" class="sub_nav">
                        <div class="sub_no" id="xifan_bd1lfsj">
                            <ul></ul>
                        </div>
                    </div>
                    <div id="xifan_bd1lfimg">
                        <div>
                            <dl class=""></dl>
                            <c:if test="${empty banners}">
                                <span>对不起，现在没有什么好推荐的！</span>
                            </c:if>
                            <c:if test="${!empty banners}">
                                <c:forEach items="${banners}" var="banner" begin="0" end="3">
                                    <dl class="">
                                        <dt>
                                            <a href="${banner.url}" title="${banner.title}" target="_blank">
                                                <img src="${banner.image}" alt="${banner.title}">
                                            </a>
                                        </dt>
                                        <dd>
                                            <h2><a href="${banner.url}" target="_blank"><span style="color: #f16e02;">精品推荐</span>：${banner.title}</a></h2>
                                        </dd>
                                    </dl>
                                </c:forEach>
                            </c:if>
                        </div>
                    </div>
                </div>
                <!-- 图片切换  end -->
                <div class="clear"></div>
                <div class="shop_bd_top_center_hot">
                    <%--w516   h119--%>
                    <DIV id="featureContainer">
                        <DIV id="feature">
                            <DIV id="block">
                                <DIV id="botton-scroll">
                                    <UL class="featureUL">
                                        <c:forEach items="${banners}" varStatus="status" var="banner" begin="0" end="7">
                                            <c:if test="${status.count>4}">
                                                <LI class="featureBox">
                                                    <DIV class="box">
                                                        <A href="${banner.url}" target="_blank">
                                                            <IMG class="slider_image" alt="" src="${banner.image}">
                                                        </A>
                                                    </DIV>
                                                </LI>
                                            </c:if>
                                        </c:forEach>
                                    </UL>
                                </DIV>
                            </DIV>
                            <A class="prev" href="javascript:void(0);">Previous</A>
                            <A class="next" href="javascript:void(0);">Next</A>
                        </DIV>
                    </DIV>
                    <DIV id=wrap>
                        <SPAN id=load>LOADING...</SPAN>
                    </DIV>
                </div>
            </div>
            <!-- 右侧 -->
            <div class="shop_bd_top_right clearfix">
                <div class="shop_bd_top_right_quickLink">
                    <c:if test="${empty user}">
                        <a href="render/login" class="login" title="用户登录">
                            <i></i>用户登录
                        </a>
                    </c:if>
                    <c:if test="${empty user}">
                        <a href="render/register" class="register" title="用户注册">
                            <i></i>用户注册
                        </a>
                    </c:if>
                    <c:if test="${!empty user}">
                            <sec:authorize access="hasRole('USER')">
                                <a href="render/user/registerShop" class="login" title="商家开店">
                                    <i></i>商家开店
                                </a>
                            </sec:authorize>
                            <sec:authorize access="hasAnyRole('SHOP_ADMIN','SHOP_USER')">
                                <a href="../render/productManager" class="login" title="店铺管理">
                                    <i></i>店铺管理
                                </a>
                            </sec:authorize>
                            <sec:authorize access="hasRole('ADMIN')">
                                <a href="../render/productManager" class="login" title="后台管理">
                                    <i></i>后台管理
                                </a>
                            </sec:authorize>
                    </c:if>
                    <c:if test="${!empty user}">
                        <a href="render/myhome" class="register" title="个人主页">
                            <i></i>个人主页
                        </a>
                    </c:if>
                    <%--<a href="javascript:void(0);" class="join" title="帮助中心">
                        <i></i>帮助中心
                    </a>--%>
                </div>

                <div class="shop_bd_top_right-style1 nc-home-news">
                    <ul class="tabs-nav">
                        <li><a href="javascript:void(0);" class="hover">商城新闻</a></li>
<%--                        <li><a href="javascript:void(0);">关于我们</a></li>--%>
                    </ul>
                    <div class="clear"></div>
                    <div class="tabs-panel">
                        <ul class="list-style01">
                            <c:forEach items="${newsList}" var="news">
                                <li><a title="${news.title}" href="/render/news/queryNewsByNewsId?news_id=${news.id}">${news.title}</a></li>
                            </c:forEach>
                        </ul>
                    </div>
                </div>
            </div>
            <!-- 右侧 End -->
        </div>
        <div class="clear"></div>
        <!-- 第一块区域 End -->

        <!-- 第二块区域 -->
        <div class="shop_bd_2 clearfix">
            <!-- 特别推荐 -->
            <div class="shop_bd_tuijian">
                <ul class="tuijian_tabs">
                    <li class="hover" onmouseover="easytabs('1', '1');" onfocus="easytabs('1', '1');" onclick="return false;"
                        id="tuijian_content_btn_1">
                        <%--
                        我的关注，各个店铺最新商品的前四个，以创建时间为头
                        搜索iproduct，
                        SELECT * FROM icollect WHERE user_id={user_id}
                        获取其中的shop_id，
                        SELECT * FROM iproduct WHERE shop_id=#{shop_id} ORDER BY create_time DESC LIMIT 4
                        显示关注店铺的前四个。
                        --%>
                        <a href="javascript:void(0);">新品上架</a>
                        <%--                    <a href="javascript:void(0);">我的关注</a>--%>
                    </li>
                    <li onmouseover="easytabs('1', '2');" onfocus="easytabs('1', '2');" onclick="return false;"
                        id="tuijian_content_btn_2">
                        <%--获取popularity，
                        SELECT * FROM iproduct ORDER BY popularity DESC LIMIT 4
                        --%>
                        <a href="javascript:void(0);">人气最多</a>
                    </li>
                    <li onmouseover="easytabs('1', '3');" onfocus="easytabs('1', '3');" onclick="return false;"
                        id="tuijian_content_btn_3">
                        <%--获取sale_count，
                        SELECT * FROM iproduct ORDER BY sale_count DESC LIMIT 4
                        --%>
                        <a href="javascript:void(0);">销量最多</a>
                    </li>
                </ul>
                <div class="tuijian_content">
                    <%--特别推荐--%>
                    <div id="tuijian_content_1" class="tuijian_shangpin" style="display: block;">
                        <ul>
                            <c:if test="${empty productCreateTime}">
                                <li id="tuijian_content_1_empty">对不起，现在没有什么好推荐的！</li>
                            </c:if>
                            <c:if test="${!empty productCreateTime}">
                                <c:forEach items="${productCreateTime}" var="product">
                                    <li>
                                        <dl>
                                            <dt>
                                                <a href="/render/product/product_detail?id=${product.id}">
                                                    <img class="tuijian_shangpin_img" src="${product.main_image}"/>
                                                </a>
                                            </dt>
                                            <dd>
                                                <a href="/render/product/product_detail?id=${product.id}">
                                                        ${product.name}
                                                </a>
                                            </dd>
                                            <dd>
                                                <a href="/render/product/product_detail?id=${product.id}">
                                                    销量：${product.sale_count}&nbsp;&nbsp;&nbsp; 浏览量：${product.popularity}
                                                </a>
                                            </dd>
                                            <dd> ￥：<em>${product.price}</em>(元)</dd>
                                        </dl>
                                    </li>
                                </c:forEach>
                            </c:if>
                        </ul>
                    </div>
                    <%--热门商品--%>
                    <div id="tuijian_content_2" class="tuijian_shangpin">
                        <ul>
                            <c:if test="${empty product_popularity}">
                                <li id="tuijian_content_1_empty">嘿嘿，还没有人气最多！</li>
                            </c:if>
                            <c:if test="${!empty product_popularity}">
                                <c:forEach items="${product_popularity}" var="product">
                                    <li>
                                        <dl>
                                            <dt>
                                                <a href="/render/product/product_detail?id=${product.id}">
                                                    <img class="tuijian_shangpin_img" src="${product.main_image}"/>
                                                </a>
                                            </dt>
                                            <dd>
                                                <a href="/render/product/product_detail?id=${product.id}">
                                                    销量：${product.sale_count}&nbsp;&nbsp;&nbsp; 浏览量：${product.popularity}
                                                </a>
                                            </dd>
                                            <dd>
                                                <a href="/render/product/product_detail?id=${product.id}">
                                                    ${product.name}
                                                </a>
                                            </dd>
                                            <dd> ￥：<em>${product.price}</em>(元)</dd>
                                        </dl>
                                    </li>
                                </c:forEach>
                            </c:if>
                        </ul>
                    </div>
                    <%--新品上架--%>
                    <div id="tuijian_content_3" class="tuijian_shangpin tuijian_content">
                        <ul>
                            <c:if test="${empty product_sale_count}">
                                <li id="tuijian_content_1_empty">嘿嘿，还没有销量最多！</li>
                            </c:if>
                            <c:if test="${!empty product_sale_count}">
                                <c:forEach items="${product_sale_count}" var="product">
                                    <li>
                                        <dl>
                                            <dt>
                                                <a href="/render/product/product_detail?id=${product.id}">
                                                    <img class="tuijian_shangpin_img" src="${product.main_image}"/>
                                                </a>
                                            </dt>
                                            <dd>
                                                <a href="/render/product/product_detail?id=${product.id}">
                                                    销量：${product.sale_count}&nbsp;&nbsp;&nbsp; 浏览量：${product.popularity}
                                                </a>
                                            </dd>
                                            <dd>
                                                <a href="/render/product/product_detail?id=${product.id}">
                                                        ${product.name}
                                                </a>
                                            </dd>
                                            <dd> ￥：<em>${product.price}</em>(元)</dd>
                                        </dl>
                                    </li>
                                </c:forEach>
                            </c:if>
                        </ul>
                    </div>
                </div>
            </div>
            <!-- 特别推荐 End -->

            <!-- 首发 -->
            <div class="shop_bd_shoufa">
                <img src="render/images/shoufa.jpg"/>
            </div>
            <!-- 首发 End -->
        </div>
        <div class="clear"></div>
        <!-- 第二块区域 End -->

        <%--左边 三级分类： varStatus、begin、step--%>
        <!-- 第三块区域 Start -->
<%--        <c:set var="categoriesOne_Name" value="${''}"></c:set>--%>
        <c:set var="categoriesOne_count" value="${1}"></c:set>
        <c:forEach items="${categoryByAll}" var="categoryByZero" varStatus="categoryByZero_status">
            <c:if test="${categoryByZero.parent_id==1}">
                <%--男装--%>
                <div class="shop_bd_home_block clearfix">
                    <!-- 左边 Start -->
                    <div class="shop_bd_home_block_left">
                        <div class="shop_bd_home_block_left_logo block_nvzhuang_logo">${categoryByZero.name}</div>
                        <div class="shop_hd_home_block_left_class clearfix">
                            <%--只需要迭代2次，迭代很多，希望进入下一个循环才计算--%>
                            <c:set var="categoriesOne_sum" value="${0}"></c:set>
                            <c:forEach items="${categoryByAll}" varStatus="status" var="categoriesOne">
                                <c:if test="${categoriesOne.parent_id==categoryByZero.id}">
                                    <c:set var="categoriesOne_sum" value="${categoriesOne_sum+1}"></c:set>
                                    <c:if test="${categoriesOne_sum<4}">
                                        <dl class="clearfix">
                                            <%----%>
                                            <dt>${categoriesOne.name!=null?categoriesOne.name:"没有名字哦!"}</dt>
                                            <dd>
                                                <c:set var="categoriesTwo_sum" value="${0}"></c:set>
                                                <c:forEach items="${categoryByAll}" var="categoriesTwo">
                                                    <c:if test="${categoriesTwo.parent_id==categoriesOne.id}">
                                                        <c:set var="categoriesTwo_sum" value="${categoriesTwo_sum+1}"></c:set>
                                                        <c:if test="${categoriesTwo_sum<4}">
                                                            <a href="javascript:void(0);"
                                                               onclick="getCategory(${categoriesTwo.id}, ${categoryByZero.id}, this)">
                                                                    ${categoriesTwo.name!=null?categoriesTwo.name:"没有名字哦!"}
                                                            </a>
                                                            <c:if test="${categoriesOne_sum<2&&categoriesTwo_sum<2}">
                                                                <c:set var="categoriesOne_Name" value="${categoriesTwo.name}"></c:set>
                                                            </c:if>
                                                        </c:if>
                                                        <c:if test="${categoriesTwo_sum>=4}">
                                                            <a href="javascript:void(0);"
                                                               onclick="postBody('/render/product/list?parent_id=${categoriesTwo.parent_id}&id=${categoriesTwo.id}&pc=1')">更多</a>
                                                        </c:if>
                                                    </c:if>
                                                </c:forEach>
                                            </dd>
                                        </dl>
                                    </c:if>
                                </c:if>
                            </c:forEach>
                        </div>
                        <div class="shop_bd_home_block_left_pic">
                            <a href="javascript:void(0);">
                                <img src="render/images/web-1-13_53bfbfc958cb55a435545033bd075bf3.png"/>
                            </a>
                        </div>
                    </div>
                    <!-- 左边 End -->

                    <!-- 中间 选取三级分类里的商品 6-->
                    <div class="shop_bd_home_block_center">
                        <ul class="tabs-nav">
                            <li><a href="javascript:void(0);" id="tabs-nav-name" class="${categoryByZero.id}">${categoriesOne_Name}</a></li>
                        </ul>
                        <div class="tabs-panel tabs-panel-center" id="${categoryByZero.id}">
                                <%--选取各个分类商品前3--%>
                                <c:if test="${!empty listProduct}">
                                    <c:forEach items="${listProduct}" var="products" varStatus="status">
                                        <c:if test="${categoriesOne_count==status.count}">
                                            <c:forEach items="${products}" var="product" begin="0" end="5">
                                                <ul>
                                                    <c:if test="${status.count<5}">
                                                        <li>
                                                            <dl>
                                                                <dt>
                                                                    <a href="/render/product/product_detail?id=${product.id}">
                                                                        <img src="${product.main_image}"/>
                                                                    </a>
                                                                </dt>
                                                                <dd>
                                                                    <a href="/render/product/product_detail?id=${product.id}">
                                                                            <%--                                                <a href="javascript:void(0);" onclick="productInfo(${product.id})">--%>
                                                                            ${product.name}
                                                                    </a>
                                                                    <br>
                                                                    <a href="/render/product/product_detail?id=${product.id}">
                                                                        销量：${product.sale_count}&nbsp;
                                                                        浏览量：${product.popularity}
                                                                    </a>
                                                                </dd>
                                                                <dd> ￥：<em>${product.price}</em>(元)</dd>
                                                            </dl>
                                                        </li>
                                                    </c:if>
                                                    <c:if test="${status.count==5}">
                                                        <li class='more_product'>
                                                            <a href='/render/product/list?id=${product.category_id}&pc=1&key=2'>更多</a>
                                                        </li>
                                                    </c:if>
                                                </ul>
                                            </c:forEach>
                                        </c:if>
                                    </c:forEach>
                                </c:if>
                                <c:if test="${empty listProduct}">
                                    <ul>
                                        <li id="tuijian_content_2_empty">该分类还没有商品!</li>
                                    </ul>
                                </c:if>
                        </div>
                    </div>
                    <!-- 中间 End -->

                    <!-- 右边商品排行 选取三级分类里的商品 7-->
                    <div class="shop_bd_home_block_right">
                        <div class="title">
                            <h3>最热商品排行</h3>
                        </div>
                        <ol class="saletop-list">
                            <%--查询该分类里商品的热门前0~2--%>
                            <c:if test="${!empty productList}">
                                <c:forEach items="${productList}" var="products" varStatus="status">
                                    <%--第几次循环==第几个products--%>
                                    <c:if test="${categoriesOne_count==status.count}">
                                        <c:forEach items="${products}" var="product" varStatus="status" begin="0" end="2">
                                            <li class="top clearfix">
                                                <dl>
                                                    <dt class="goods-name">
                                                        <a href="/render/product/product_detail?id=${product.id}">
                                                            ${product.name}
                                                        </a>
                                                    </dt>
                                                    <dd class="nokey">${status.count}</dd>
                                                    <dd class="goods-pic">
                                                        <a href="/render/product/product_detail?id=${product.id}">
                                                            <span class="thumb size60">
                                                                <img src="${product.main_image}"/>
                                                            </span>
                                                        </a>
                                                    </dd>
                                                    <dd class="goods-descript">
                                                        <em>销量：${product.sale_count}&nbsp;&nbsp;&nbsp;
                                                        浏览量：${product.popularity}</em>
                                                    </dd>
                                                    <dd class="goods-price">
                                                        <em>${product.price}</em>
                                                    </dd>
                                                </dl>
                                            </li>
                                        </c:forEach>
                                    </c:if>
                                </c:forEach>
                            </c:if>

                            <%--前3~6--%>
                            <c:if test="${!empty productList}">
                                <c:forEach items="${productList}" var="products" varStatus="status">
                                    <c:if test="${categoriesOne_count==status.count}">
                                        <c:forEach items="${products}" begin="0" end="6" var="product" varStatus="status">
                                            <c:if test="${status.count>3}">
                                                <li class="normal">
                                                    <i>${status.count}</i>
                                                    <a href="/render/product/product_detail?id=${product.id}">${product.name}</a>
                                                </li>
                                            </c:if>
                                        </c:forEach>
                                    </c:if>
                                </c:forEach>
                            </c:if>
                        </ol>
                        <div class="saletop-list_adv_pic">
                            <a href="javascript:void(0);">
                                <img src="/render/images/web-3-38_ff9bd2d724f7138cec1b1937000f4feb.jpg"/>
                            </a>
                        </div>
                    </div>
                    <!-- 右边商品排行 -->

                    <!-- 品牌展示 选取合作品牌8-->
                    <div class="shop_bd_home_block_bottom">
                        <ul class="">
                            <li><a href="javascript:void(0);"><img
                                    src="render/images/354b80528d2fbeefbab33c563532517e.gif"/></a></li>
                            <li><a href="javascript:void(0);"><img
                                    src="render/images/1d2dfbead590510046a6522551db8139.gif"/></a></li>
                            <li><a href="javascript:void(0);"><img
                                    src="render/images/26247430b09daa1b441b46008bfb6e6e.gif"/></a></li>
                            <li><a href="javascript:void(0);"><img
                                    src="render/images/a0ac8c6d2d3dc1470d5876923182a8e2.gif"/></a></li>
                            <li><a href="javascript:void(0);"><img
                                    src="render/images/9c5dee77a6ecdafd9e152fed8c6a4e90.gif"/></a></li>
                            <li><a href="javascript:void(0);"><img
                                    src="render/images/b175883eba95e793affb1b1ebbbf85a5.gif"/></a></li>
                            <li><a href="javascript:void(0);"><img
                                    src="render/images/6e61a1c953e5bc8c5f1ffdac36862245.gif"/></a></li>
                            <li><a href="javascript:void(0);"><img
                                    src="render/images/209abd835cd2ce2208f2dc42ba10efb4.gif"/></a></li>
                        </ul>
                    </div>
                    <!-- 品牌展示 End -->
                </div>
                <div clas="clear"></div>
                <c:set var="categoriesOne_count" value="${categoriesOne_count+1}"></c:set>
            </c:if>
        </c:forEach>
        <!-- 第三块区域 End -->

        <!-- 第五块区域 End -->
        <div class="faq">
            <dl>
                <dt>帮助中心</dt>
                <dd><a href="javascript:void(0);"><span>积分兑换说明</span></a></dd>
                <dd><a href="javascript:void(0);"><span>积分明细</span></a></dd>
                <dd><a href="javascript:void(0);"><span>查看已购买商</span></a></dd>
                <dd><a href="javascript:void(0);"><span>我要买</span></a></dd>
                <dd><a href="javascript:void(0);"><span>忘记密码</span></a></dd>
            </dl>

            <dl>
                <dt>店主之家</dt>
                <dd><a href="javascript:void(0);"><span>如何申请开店</span></a></dd>
                <dd><a href="javascript:void(0);"><span>商城商品推荐</span></a></dd>
                <dd><a href="javascript:void(0);"><span>如何发货</span></a></dd>
                <dd><a href="javascript:void(0);"><span>查看已售商品</span></a></dd>
                <dd><a href="javascript:void(0);"><span>如何管理店铺</span></a></dd>
            </dl>

            <dl>
                <dt>支付方式</dt>
                <dd><a href="javascript:void(0);"><span>公司转账</span></a></dd>
                <dd><a href="javascript:void(0);"><span>邮局汇款</span></a></dd>
                <dd><a href="javascript:void(0);"><span>分期付款</span></a></dd>
                <dd><a href="javascript:void(0);"><span>在线支付</span></a></dd>
                <dd><a href="javascript:void(0);"><span>如何注册支付</span></a></dd>
            </dl>

            <dl>
                <dt>售后服务</dt>
                <dd><a href="javascript:void(0);"><span>退款申请</span></a></dd>
                <dd><a href="javascript:void(0);"><span>返修/退换货</span></a></dd>
                <dd><a href="javascript:void(0);"><span>退换货流程</span></a></dd>
                <dd><a href="javascript:void(0);"><span>退换货政策</span></a></dd>
                <dd><a href="javascript:void(0);"><span>联系卖家</span></a></dd>
            </dl>

            <dl>
                <dt>客服中心</dt>
                <dd><a href="javascript:void(0);"><span>修改收货地址</span></a></dd>
                <dd><a href="javascript:void(0);"><span>商品发布</span></a></dd>
                <dd><a href="javascript:void(0);"><span>会员修改个人</span></a></dd>
                <dd><a href="javascript:void(0);"><span>会员修改密码</span></a></dd>

            </dl>

            <dl>
                <dt>关于我们</dt>
                <dd><a href="javascript:void(0);"><span>合作及洽谈</span></a></dd>
                <dd><a href="javascript:void(0);"><span>招聘英才</span></a></dd>
                <dd><a href="javascript:void(0);"><span>联系我们</span></a></dd>
                <dd><a href="javascript:void(0);"><span>关于Shop</span></a></dd>
            </dl>
        </div>

        <div class="clear"></div>
    </div>
</div>
<!-- Body End -->

<!-- Footer - wll -->
<jsp:include page="common/footer.jsp"></jsp:include>
<!-- Footer End -->

<%--<script type="text/javascript" src="render/js/frontend/topNav.js"></script>--%>
<script type="text/javascript" src="render/js/frontend/focus.js"></script>
<script type="text/javascript" src="render/js/frontend/shop_home_tab.js"></script>
<script type="text/javascript">

    function postBody(s) {
        $.ajax({
            url: s,
            type: "get",
            success: function (data) {
                $(".my_body").empty();
                $(".my_body").html(data);
            }
        });
    }

    movec();

    function getCategory(pid, cz_id, athis) {
        var content = "";
        $.ajax({
            type: 'get',
            url: "/render/product/getProductsByCid?category_id=" + pid,
            success: function (data) {
                if (data.success) {

                    if (data.message == null||data.message=='') {
                        content +=  "<ul>"+
                                        "<li id='tuijian_content_2_empty'>该分类还没有商品!</li>"+
                                    "</ul>";
                    }else{
                        $.each(data.message, function (i, product) {
                            if (5 > i) {
                                content += "<ul>" +
                                    "<li>" +
                                    "<dl>" +
                                    "<dt>" +
                                    "<a href='javascript:void(0)'>" +
                                    "<img src='" + product.main_image + "'/>" +
                                    "</a>" +
                                    "</dt>" +
                                    "<dd>" +
                                    "<a href='/render/product/product_detail?id=" + product.id + "'>" + product.name +
                                    "</a>" +
                                    "</dd>" +
                                    "<dd>" +
                                    "<a href='/render/product/product_detail?id=" + product.id + "'>" +
                                    "销量：" + product.sale_count + "&nbsp;&nbsp;&nbsp; 浏览量：" + product.popularity +
                                    "</a>" +
                                    "</dd>" +
                                    "<dd>" +
                                    "￥：<em>" + product.price +
                                    "</em>(元)" +
                                    "</dd>" +
                                    "</dl>" +
                                    "</li>" +
                                    "</ul>";
                            }

                            if (5 == i) {
                                content += "<ul>" +
                                    "<li class='more_product'><a href='/render/product/list?id="+product.category_id+"&pc=1&key=2'>更多</a>" +
                                    "</li>" +
                                    "</ul>";
                            }
                        });
                    }
                }

                var name=$(athis).text();
                console.log(name);
                $("." + cz_id).text(name);
                $("#" + cz_id).empty();
                $("#" + cz_id).html(content);
            }
        }, "json");
    }
</script>

</body>
</html>